import Vue from "vue";
import VueRouter from "vue-router";
import Login from '../pages/Login.vue'
import Manage from '../pages/Manage.vue'
import Student from '../pages/Student.vue'
import Product from '../pages/Product.vue'
import Total from '../pages/Total.vue'
import Test from '../pages/Test.vue'
Vue.use(VueRouter);

const routes = [
    { path: "/", component: Login },
    { path: "/login", component: Login },
    { path: "/test", component: Test },
    { path: "/manage", component: Manage, children: [
        { path: "student", component: Student },
        { path: "product", component: Product },
        { path: "total", component: Total },
    ] }
];

export default new VueRouter({
    mode: "history",
    routes // (缩写) 相当于 routes: routes
});